#pragma once

#include "pnt3f.h"

struct transform3f
{
	transform3f(); //by default E

	transform3f(
		float m11, float m12, float m13,
		float m21, float m22, float m23,
		float m31, float m32, float m33);

	transform3f(
		float m11, float m12, float m13, float m14,
		float m21, float m22, float m23, float m24,
		float m31, float m32, float m33, float m34);

	float t11, t12, t13, t14;
	float t21, t22, t23, t24;
	float t31, t32, t33, t34;
};

transform3f compute_rot_matrix(const vec3f v, float s, float c);
transform3f compute_translation_matrix(const vec3f v);

pnt3f transform(const transform3f& M, const pnt3f p);
vec3f transform(const transform3f& M, const vec3f v);
transform3f inverse(const transform3f& M);

transform3f operator*(const transform3f &A, const transform3f &B);

//should in separate header
float det2(float a00,  float a01, float a10, float a11);
float det3(float a00, float a01, float a02,
			float a10, float a11, float a12,
			float a20, float a21, float a22);